package com.lbn.monitor.app.monitor.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.widget.TextView;

import com.lbn.monitor.R;
import com.lbn.monitor.api.model.Device;

import java.util.List;

import butterknife.BindView;
import indi.free.widgets.custom_recycler_view.BasePagerRecyclerAdapter;
import indi.free.widgets.custom_recycler_view.RecyclerViewHolder;

/**
 * @author 李炳南
 * @date 2017/3/6
 */
public class MfListAdapter extends BasePagerRecyclerAdapter<Device> {


    public MfListAdapter(Context ctx, RecyclerView recyclerView, List<Device> list) {
        super(ctx, recyclerView, list);
    }

    @Override
    public int getItemLayoutId() {
        return R.layout.layout_item_mflist;
    }

    @Override
    public void bindData(RecyclerViewHolder holder, int position, Device item) {
        holder.getTextView(R.id.name).setText("设备名称 : " + item.getTreename());
        holder.getTextView(R.id.mn).setText("设备MN号 : " + item.getDeviceMN());
        holder.getTextView(R.id.location).setText(item.getInstallLocation());
    }
}
